<!DOCTYPE HTML>
<html  lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<th:block th:include="include :: datetimepicker-css" />
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
	<form class="form-horizontal m" id="form-elevatorInfo-edit" th:object="${elevatorInfo}">
		<input id="elevatorId" name="elevatorId" th:field="*{elevatorId}"  type="hidden">
		<div class="form-group">
			<label class="col-sm-3 control-label"><span style="color: red; ">*</span>品牌：</label>
			<div class="col-sm-6">
				<input id="elevatorBrand"  placeholder="请选择品牌" name="elevatorBrand" th:field="*{elevatorBrand}" class="form-control" type="text" required>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-3 control-label"><span style="color: red; ">*</span>厂商：</label>
			<div class="col-sm-6">
				<input id="vendor"  placeholder="请输入厂商" name="vendor" th:field="*{vendor}" class="form-control" type="text" required>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-3 control-label"><span style="color: red; ">*</span>生产日期：</label>
			<div class="col-sm-6">
				<div class="input-group date">
					<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
					<input id="productionDate" name="productionDate" th:field="*{productionDate}" type="text" class="form-control" placeholder="yyyy-MM-dd" required>
				</div>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-3 control-label">使用类型：</label>
			<div class="col-sm-6">
				<input id="useType" placeholder="请选择使用类型" name="useType" th:field="*{useType}" class="form-control" type="text">
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-3 control-label">额定载重（kg）：</label>
			<div class="col-sm-6">
				<input id="ratedLoad" placeholder="请输入额定载重（kg）" name="ratedLoad" th:field="*{ratedLoad}" class="form-control" type="text">
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-3 control-label">缓冲器类型：</label>
			<div class="col-sm-6">
				<input id="bumperType" placeholder="请选择缓冲器类型" name="bumperType" th:field="*{bumperType}" class="form-control" type="text">
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-3 control-label"><span style="color: red; ">*</span>型号：</label>
			<div class="col-sm-6">
				<input id="modelNumber" placeholder="请选择型号" name="modelNumber" th:field="*{modelNumber}" class="form-control" type="text" required>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-3 control-label">出厂编号：</label>
			<div class="col-sm-6">
				<input id="factoryCode" placeholder="请输入出厂编号" name="factoryCode"  th:field="*{factoryCode}" class="form-control" type="text">
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-3 control-label">额定速度（m/s）：</label>
			<div class="col-sm-6">
				<input id="nominal" placeholder="请输入额定速度（m/s）" name="nominal" th:field="*{nominal}" class="form-control" type="text">
			</div>
		</div>
	</form>
</div>
<div th:include="include::footer"></div>
<script type="text/javascript">
	var prefix = ctx + "business/elevatorInfo"
	$("#form-elevatorInfo-edit").validate({
		rules:{
			xxxx:{
				required:true,
			},
		}
	});


	$(function () {
		/* 日期控件 */
		layui.use('laydate', function() {
			var laydate = layui.laydate;
			laydate.render({
				elem: '#productionDate',
				type: 'date'
			});
		});
	});

	function submitHandler() {
		if ($.validate.form()) {
			$.operate.save(prefix + "/edit", $('#form-elevatorInfo-edit').serialize());
		}
	}
</script>
</body>
</html>
